import request from '@/utils/request'

// 查询物料分类列表
export function listMaterialClassification(query) {
  return request({
    url: '/storage/materialClassification/list',
    method: 'get',
    params: query
  })
}

// 查询物料分类详细
export function getMaterialClassification(id) {
  return request({
    url: '/storage/materialClassification/' + id,
    method: 'get'
  })
}

// 新增物料分类
export function addMaterialClassification(data) {
  return request({
    url: '/storage/materialClassification',
    method: 'post',
    data: data
  })
}

// 修改物料分类
export function updateMaterialClassification(data) {
  return request({
    url: '/storage/materialClassification',
    method: 'put',
    data: data
  })
}

// 删除物料分类
export function delMaterialClassification(id) {
  return request({
    url: '/storage/materialClassification/' + id,
    method: 'delete'
  })
}


// 查询物料分类多级下拉框
export function getCategoryOptions() {
  return request({
    url: '/storage/materialClassification/cascader-options',
    method: 'get',
  })
}
